/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package negocio;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 *
 * @author diego
 */
@Entity
public class Tarifa implements Serializable {

    @Id    
    @Column(name="TARIFA_ID")
    private Integer id;
    
    @ManyToOne    
    @JoinColumn(name="FILA_ID")
    private Fila fila;
    
    @ManyToOne    
    @JoinColumn(name="FUNCION_ID")
    private Funcion funcion;
    
    
    @Basic
    private Double unPrecio;
    
    @Basic
    private boolean activa;

    public Tarifa() {
    }

    public Tarifa(Fila unaFila, Funcion unaFuncion,Double unPrecio) {
        
        this.fila = unaFila;
        this.funcion = unaFuncion;
        this.unPrecio = unPrecio;
        this.activa = true;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Fila getUnaFila() {
        return fila;
    }

    public void setUnaFila(Fila unaFila) {
        this.fila = unaFila;
    }

    public Funcion getUnaFuncion() {
        return funcion;
    }

    public void setUnaFuncion(Funcion unaFuncion) {
        this.funcion = unaFuncion;
    }

    public Double getUnPrecio() {
        return unPrecio;
    }

    public void setUnPrecio(Double unPrecio) {
        this.unPrecio = unPrecio;
    }

    public boolean isActiva() {
        return activa;
    }
    public boolean getActiva(){
        return activa;
    }

    public void setActiva(boolean activa) {
        this.activa = activa;
    }
    
    public void habilitar(){
        this.activa = true;
    }
    
    public void deshabilitar(){
        this.activa = false;
    }

    
    
    
}
